# 本函数仅用于生成封面 -> generate_front_page

from types import SimpleNamespace

import json


def construct_data(data_json_path):
    with open(data_json_path, encoding="utf-8") as txt:
        project = json.load(txt, object_hook=lambda d: SimpleNamespace(**d))
    return project


def construct_content(result_json_path):
    with open(result_json_path, encoding="utf-8") as txt:
        project = json.load(txt, object_hook=lambda d: SimpleNamespace(**d))
    return project